/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

/*
 *  This file is part of WWWPal.
 *
 *  Copyright (C) 2003  Dr. John Punin, Department of Computer Science
 *  Rensselaer Polytechnic Institute
 *
 *  WWWPal is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  WWWPal is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Foobar; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
#ifndef LOGR_USER_GRAPH_H
#define LOGR_USER_GRAPH_H

#include <sys/stat.h>
#include <sys/fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <ctype.h>
#include <sys/time.h>
#include <assert.h>
#include <gr_graph_fun.h>


typedef struct _web_ugraph_node {
    long naccesses;
    void *info;
    LNode_type *lusers;
    LNode_type *lpaths;
} WebUgraphStruct;

typedef struct _web_ugraph_node *WebUgraphPtr;

WebUgraphPtr
new_web_ugraph_node(void);

void
delete_web_ugraph_node(WebUgraphPtr opn);

void
LOGR_set_ugraph_naccesses(WebUgraphPtr usn,long num);

void
LOGR_inc_ugraph_naccesses(WebUgraphPtr usn);

long
LOGR_get_ugraph_naccesses(WebUgraphPtr usn);

void
LOGR_set_ugraph_info(WebUgraphPtr ugn,void * info);

void *
LOGR_get_ugraph_info(WebUgraphPtr ugn);

void
LOGR_set_ugraph_lusers(WebUgraphPtr ugn,LNode_type * lusers);

void
LOGR_add_ugraph_user(WebUgraphPtr ugn,void *user);

LNode_type *
LOGR_get_ugraph_lusers(WebUgraphPtr ugn);

void
LOGR_set_ugraph_lpaths(WebUgraphPtr ugn,LNode_type * lpaths);

void
LOGR_add_ugraph_path(WebUgraphPtr ugn,void *path);

LNode_type *
LOGR_get_ugraph_lpaths(WebUgraphPtr ugn);

int
LOGR_is_ugraph_access_lower(WebUgraphPtr u, WebUgraphPtr v);

int
LOGR_is_ugraph_access_bigger(WebUgraphPtr u,WebUgraphPtr v);

int
LOGR_is_ugraph_number_edges_lower(WebUgraphPtr u, WebUgraphPtr v);

int
LOGR_is_ugraph_number_edges_bigger(WebUgraphPtr u,WebUgraphPtr v);

void *
LOGR_get_ugraph_gen_edge(WebUgraphPtr usn,int j);

int 
LOGR_get_ugraph_number_edges(WebUgraphPtr usn);

int 
LOGR_get_ugraph_num_users(WebUgraphPtr usn);


#endif

